
--给unity类型起别名
local GameObject = UnityEngine.GameObject
local ParticleSystem = UnityEngine.ParticleSystem
local LuaCallCSMono = Test.LuaCallCSMono
local LuaCallCS = Test.LuaCallCS

--实例化游戏对象
local go = GameObject("lua_particle")

--C#的成员函数用： 静态函数用
go : AddComponent(typeof(ParticleSystem))


--普通类
local luacall =LuaCallCS()
luacall:Test01()
LuaCallCS:Test03()

local go = GameObject("luacall")
local luacall = go:AddComponent(typeof(LuaCallCSMono))
luacall:Test01()

local luacall2 = go:AddComponent(typeof(LuaCallCSMono))
luacall2:Test01()